/**
* 登录模块，提供登录相关业务功能
* @Date:    2015-6-16
* @author:  Jackson wang
* @version: 1.0
* @since:   1.0
*/
app.addModule('main', function(context) {

	'use strict';

	var formServ,
		ajaxServ,
		msgServ,
		tabServ,
		moduleEl,
		formEl,
		private_method=0,
		formData=0;

	private_method = {
		
		


	};
	return {
		/**
		*
		* 初始化方法，进行模块内部的初始化工作		
		*/
		init:function(){
			ajaxServ = context.getService('ajax-serv');
			msgServ = context.getService('msg-serv');
			tabServ = context.getService('tab-serv');
		},

		/**
		*
		* 销毁方法，清除遗留数据及方法绑定，释放内存		*
		*/
		destory:function(){
			formServ = null;
			moduleEl = null;
			formEl = null;
			formData = null;
			msgServ = null;
		},
		
		
		
		
		/**
		 * 主页面导航栏按钮监听函数
		 */
		onclick:function(event, element, elementType){
			if(elementType=='accordion-btn'){
				var _url = $(element).attr('targetUrl');
				
				var _options={target:'centerTabs',title:'组织架构',tabUrl:_url,tools:[]};
				if(_url){
					tabServ.addHrefTab(_options);
				}
			}
			
			event.preventDefault();
		}
		
		

	};

});